//
// Created by 0209 on 2025/10/13.
//

#ifndef STATEMANAGER_H
#define STATEMANAGER_H

#include <QString>
#include <QSettings>

/*
 * 保存类
 */

class StateManager
{
public:
    StateManager(const QString &fileName = "config.ini");
    // 通用保存接口
    void saveValue(const QString &key, const QVariant &value);
    // 通用读取接口
    QVariant loadValue(const QString &key, const QVariant &defaultValue = QVariant()) const;
private:
    QSettings settings;
};


#endif //STATEMANAGER_H
